# require 'Math'
# 返回值
def whetherLeapYear(year)
    if (year%4 or year%100) == 0 and year%400 != 0 then puts "this is leap year"
    else puts "this is common year" end
    return "hello world"
    1
end
puts whetherLeapYear(2004)
# 可变数量参数
def gouguTheorem(*arg)
    # return Math.sqrt(arg[0]**2 + arg[1]**2)
    for i in 0...arg.length
        puts "args is  #{arg[i]}"
    end
    return Math.sqrt(8)
end
puts gouguTheorem(2,2)
# 类方法
class Accounts
   def reading_charge
   end
   def Accounts.return_date
      puts "test return_data"
   end
end
Accounts.return_date
# alias
alias sqrt_fun gouguTheorem
puts sqrt_fun(3,3)
# undef
